package win.devhu.testing.SpringBoot2Kotlin.jpaDemo

import com.fasterxml.jackson.annotation.JsonInclude

//封装返回体
@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class Response(
        val status: Boolean = false,
        val msg :String = "",
        val data : Any? = null  //注意“？” 它允许对象赋null值
)

/**
 * JsonInclude.Include.ALWAYS          默认
 * JsonInclude.Include.NON_DEFAULT     属性为默认值不序列化
 * JsonInclude.Include.NON_EMPTY       属性为 空（””） 或者为 NULL 都不序列化
 * JsonInclude.Include.NON_NULL        属性为NULL不序列化
 * */